package com.example.mybatisplus.controller;

import com.example.mybatisplus.entity.Account;
import com.example.mybatisplus.entity.WholeWeight;
import com.example.mybatisplus.service.AccountService;
import com.example.mybatisplus.service.WholeWeightService;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
public class OpenApiController {
    @Autowired
    private AccountService accountService;
    @Autowired
    private WholeWeightService wholeWeightService;

    @GetMapping("getAccount")
    public Account getAccount(String id){
        return accountService.getById(id);
    }

    @GetMapping("getWholeWeight")
    public WholeWeight getWholeWeight(String id){
        return wholeWeightService.getById(id);
    }

}
